home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Zoo6.Dxr / 00034.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  2.9 KB  |  77 lines

  1. on Seg1
  2.   global LbalanceHList, LbalanceVList, RbalanceHList, RbalanceVList, onScaleList, activeSprite, LcurrentWeight, RcurrentWeight, offRight, tempObject
  3.   setAt(onScaleList, activeSprite - 13, 1)
  4.   set tempWeight to integer(the name of cast the castNum of sprite activeSprite)
  5.   if offRight then
  6.     set RcurrentWeight to RcurrentWeight - tempWeight
  7.     set the castNum of sprite 12 to the number of cast string(RcurrentWeight)
  8.   else
  9.     set LcurrentWeight to LcurrentWeight + tempWeight
  10.     set the castNum of sprite 11 to the number of cast string(LcurrentWeight)
  11.   end if
  12.   set tempR to RcurrentWeight - LcurrentWeight + 5
  13.   if tempR < 1 then
  14.     set tempR to 1
  15.   end if
  16.   if tempR > 9 then
  17.     set tempR to 9
  18.   end if
  19.   set holdOld to the castNum of sprite 6
  20.   set the castNum of sprite 6 to the number of cast "place holder" + tempR
  21.   set the locH of sprite 11 to getAt(LbalanceHList, tempR)
  22.   set the locV of sprite 11 to getAt(LbalanceVList, tempR)
  23.   set the locH of sprite 12 to getAt(RbalanceHList, tempR)
  24.   set the locV of sprite 12 to getAt(RbalanceVList, tempR)
  25.   set holdOld to the castNum of sprite 6 - holdOld
  26.   set holdOld to abs(holdOld)
  27.   repeat with T = 14 to 17
  28.     repeat with r = 1 to holdOld
  29.       if getAt(onScaleList, T - 13) = 1 then
  30.         if the locH of sprite T > 172 then
  31.           set the locV of sprite T to the locV of sprite T - 6
  32.           next repeat
  33.         end if
  34.         set the locV of sprite T to the locV of sprite T + 6
  35.       end if
  36.     end repeat
  37.   end repeat
  38. end
  39.  
  40. on Seg2
  41.   global LbalanceHList, LbalanceVList, RbalanceHList, RbalanceVList, onScaleList, activeSprite, LcurrentWeight, RcurrentWeight, offLeft, tempObject
  42.   setAt(onScaleList, activeSprite - 13, 1)
  43.   set tempWeight to integer(the name of cast the castNum of sprite activeSprite)
  44.   if offLeft then
  45.     set LcurrentWeight to LcurrentWeight - tempWeight
  46.     set the castNum of sprite 11 to the number of cast string(LcurrentWeight)
  47.   else
  48.     set RcurrentWeight to RcurrentWeight + tempWeight
  49.     set the castNum of sprite 12 to the number of cast string(RcurrentWeight)
  50.   end if
  51.   set tempR to RcurrentWeight - LcurrentWeight + 5
  52.   if tempR > 9 then
  53.     set tempR to 9
  54.   end if
  55.   if tempR < 1 then
  56.     set tempR to 1
  57.   end if
  58.   set holdOld to the castNum of sprite 6
  59.   set the castNum of sprite 6 to the number of cast "place holder" + tempR
  60.   set the locH of sprite 11 to getAt(LbalanceHList, tempR)
  61.   set the locV of sprite 11 to getAt(LbalanceVList, tempR)
  62.   set the locH of sprite 12 to getAt(RbalanceHList, tempR)
  63.   set the locV of sprite 12 to getAt(RbalanceVList, tempR)
  64.   set holdOld to the castNum of sprite 6 - holdOld
  65.   repeat with T = 14 to 17
  66.     repeat with r = 1 to holdOld
  67.       if getAt(onScaleList, T - 13) = 1 then
  68.         if the locH of sprite T < 172 then
  69.           set the locV of sprite T to the locV of sprite T - 6
  70.           next repeat
  71.         end if
  72.         set the locV of sprite T to the locV of sprite T + 6
  73.       end if
  74.     end repeat
  75.   end repeat
  76. end
  77.